home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 351-375 / 351 / pdc / pdcsrc.lzh / PDC / CGlbDef.c < prev    next >
C/C++ Source or Header  |  1990-04-06  |  3KB  |  113 lines

  1.  
  2. /* PDC Compiler - A Freely Distributable C Compiler for the Amiga
  3.  *                Based upon prior work by Matthew Brandt and Jeff Lydiatt.
  4.  *
  5.  * PDC Compiler release 3.3 Copyright (C) 1989 Paul Petersen and Lionel Hummel.
  6.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  7.  *
  8.  * This code is freely redistributable upon the conditions that this 
  9.  * notice remains intact and that modified versions of this file not be 
  10.  * distributed as part of the PDC Software Distribution without the express
  11.  * consent of the copyright holders.
  12.  *
  13.  *------------------------------------------------------------------
  14.  *
  15.  * $Log:    CGlbDef.c,v $
  16.  * Revision 3.33  90/04/04  02:30:03  lionel
  17.  * *** empty log message ***
  18.  * 
  19.  * Revision 3.32  90/02/03  16:23:06  lionel
  20.  * None
  21.  * 
  22.  *------------------------------------------------------------------
  23.  */
  24.  
  25. /*
  26.  * CGlbDef.c global definitions
  27.  */
  28.  
  29. #include    <stdio.h>
  30. #include    "C.h"
  31. #include    "Expr.h"
  32. #include    "Gen.h"
  33.  
  34. static char *RCSid = "$Header: work:PDC/src/PDC/RCS/CGlbDef.c,v 3.33 90/04/04 02:30:03 lionel Exp Locker: lionel $";
  35.  
  36. FILE *input = NULL;
  37. FILE *list = NULL;
  38. FILE *output = NULL;
  39.  
  40. struct OptTab {
  41.     int             Optimize;
  42.     int             List;
  43.     int             Quiet;
  44.     int             Annote;
  45.     int             Frame;
  46.     int             Debug;
  47.     int             MulDiv32;
  48.     int             Builtin;
  49.     int             PreComp;
  50.     int             Stack;
  51. };
  52.  
  53. /*
  54.  *  Optimize    ON 
  55.  *  List        OFF 
  56.  *  Quiet       OFF 
  57.  *  Annote      OFF 
  58.  *  Frame       A5
  59.  *  Debug       OFF 
  60.  *  MulDiv32    ON
  61.  *  Builtin     OFF
  62.  *  PreComp     OFF
  63.  *  Stack       OFF
  64.  */
  65.  
  66. struct OptTab   Options = {1, 0, 0, 0, 5, 0, 1, 0, 0, 0};
  67.  
  68. int             lineno = 0;
  69. int             nextlabel = 0;
  70. int             lastch = 0;
  71. enum e_sym      lastst = id;
  72. char            lastid[MAX_IDP1] = "";
  73. char            laststr[MAX_STLP1] = "";
  74. char           *curfile;
  75. long            ival = 0;
  76. double          rval;
  77.  
  78. TABLE           gsyms = {NULL, NULL},
  79.                 lsyms = {NULL, NULL};
  80.  
  81. SYM            *lastfunc = NULL;
  82. SYM            *lasthead = NULL;
  83. struct slit    *strtab = NULL;
  84.  
  85. int             lc_static = 0;
  86. int             lc_auto = 0;
  87. int             lc2_auto = 0;
  88. int             lc_base = 0;
  89. int             float_auto = 0;
  90. int             nest_level = 0;
  91. int             maxparmsize = 0;
  92.  
  93. char            code_name[ 64 ] = "1";
  94. char            data_name[ 64 ] = "2";
  95. char            bss_name[ 64 ] = "3";
  96.  
  97. struct snode   *bodyptr = NULL;
  98. struct snode   *autohead = NULL;
  99. struct snode   *autotail = NULL;
  100.  
  101. struct libcall *libpragma = NULL;
  102.  
  103. int             global_flag = 1;
  104. TABLE           defsyms = {NULL, NULL};
  105. TABLE           cmd_defsyms = {NULL, NULL};
  106. TABLE           cmd_undefsyms = {NULL, NULL};
  107. TABLE           cmd_include = {NULL, NULL};
  108. TABLE           cmd_local = {NULL, NULL};
  109.  
  110. int             save_mask = 0;  /* register save mask    */
  111. int             PdcFlags = 0;   /* Flags to load libraries   */
  112.  
  113.